﻿import { httpGet, httpPost, httpRequest } from '../http'

export function getGoodsList(currrentPage, pageSize) {
    //交给页面层处理promise
    return httpGet({ url: `goods/${currrentPage}/${pageSize}` })
}

export function modifyGood(data) {
    //交给页面层处理promise
    return httpRequest({ url: 'update', data, method: 'put' })
}

export function getBookById(id) {
    //交给页面层处理promise
    return httpGet({ url: `book/${id}` })

}
//这里必须要返回
export function login(data) {
    //交给页面层处理promise
    return httpPost({ url: 'login', data })
}